var app = getApp()
Page({
data: { 
 fostered_catlist: [
{ name:"康康（猫）"},
{ name:"大头"},
{ name:"德德"},
{ name:"克拉"},
{ name:"豆豆"},
{ name:"芝麻"},
{ name:"依依"},
{ name:"欧欧"},
{ name:"萌萌"},
{ name:"花卷"},
{ name:"元宵"},
{ name:"小团子"},
{ name:"饭桶"},
{ name:"花花（西区）"},
{ name:"临临"},
{ name:"臭臭"},
{ name:"福福"},
{ name:"夜斓"},
{ name:"圆圆"},
{ name:"基德"},
{ name:"十五"},
{ name:"窗窗"},
{ name:"乖宝"},
{ name:"憨豆"},
{ name:"伊伊"},
{ name:"飞飞"},
{ name:"眠眠"},
{ name:"小花（狗）"},
{ name:"小狗六只"},
{ name:"怂怂（狗）"},
{ name:"花盆"},
{ name:"小乖乖"},
{ name:"燕尾服"},
{ name:"怂怂"},
{ name:"奶油"},
{ name:"可可"},
{ name:"咪咪"},
{ name:"亮亮"},
{ name:"焦糖"},
{ name:"橘里"},
{ name:"狗蛋"},
{ name:"小奶瓶"},
{ name:"三火"},
{ name:"大狸"},
{ name:"小博"},
{ name:"小潇"},
{ name:"菲利"},
{ name:"小白"},
{ name:"辛巴"},
{ name:"小鼻子"},
{ name:"黎安"},
{ name:"黑尾酱"},
{ name:"小小"},
{ name:"肚肚"},
{ name:"顶顶"},
],
 unknown_catlist: [
{ name:"鳌拜"},
{ name:"芹芹"},
{ name:"坨坨"},
{ name:"肉肉"},
{ name:"稳稳"},
{ name:"波波"},
{ name:"花花"},
{ name:"一线天"},
{ name:"大白"},
{ name:"玉环"},
{ name:"圈圈"},
{ name:"酷仔"},
{ name:"霸天虎"},
{ name:"大壮"},
{ name:"呼呼"},
{ name:"叁柒"},
{ name:"茶花"},
{ name:"弟弟"},
{ name:"宾士"},
{ name:"虎子"},
{ name:"橘气"},
{ name:"梅花"},
{ name:"狸花"},
{ name:"拿破仑"},
{ name:"三角脸"},
{ name:"腿腿"},
{ name:"小米"},
{ name:"小橘子"},
{ name:"小花"},
{ name:"无敌"},
{ name:"招财"},
{ name:"鱼钩"},
{ name:"小黑"},
{ name:"小H"},
{ name:"矮脚黄"},
{ name:"矮脚花"},
{ name:"棉棉"},
{ name:"牛牛"},
{ name:"花生酱"},
{ name:"芒果"},
{ name:"未未"},
{ name:"栗子"},
{ name:"元宝"},
],
 dead_catlist: [
{ name:"安安"},
{ name:"卡纳"},
{ name:"奶盖"},
{ name:"康康"},
{ name:"黄儿"},
{ name:"小丸子"},
{ name:"妥拉"},
{ name:"无名橘白"},
{ name:"蜜蜜"},
{ name:"竞雄"},
{ name:"大黄"},
{ name:"卓别林"},
{ name:"威力"},
{ name:"香香"},
{ name:"狐狐"},
{ name:"安乐"},
{ name:"二白"},
{ name:"元气"},
{ name:"楼楼"},
],
    screenWidth: 0,
    screenHeight: 0,
    imgwidth: 0,
    imgheight: 0,
    navbar: ['在校', '毕业', '休学', '喵汪星'],
    currentTab: 0,
  },
   navbarTap: function (e) {
     this.setData({
       currentTab: e.currentTarget.dataset.idx
     })
   },

   iconType: [
     'success', 'success_no_circle', 'info', 'warn', 'waiting', 'cancel', 'download', 'search', 'clear'
   ],

  onPullDownRefresh:function(){
    wx.stopPullDownRefresh()
  },

  //转发跳转页面设置
  onLoad: function (options) {
    if (options.pageId) {
      wx.navigateTo({
        url: '/pages/cats/' + options.pageId + '/' + options.pageId,
      })
    }
  },

  //转发此页面的设置
  onShareAppMessage: function (ops) {
    if (ops.from === 'button') {
      // 来自页面内转发按钮
      console.log(ops.target)
    }
    return {
      path: 'pages/index/index',  // 路径，传递参数到指定页面。
      success: function (res) {
        // 转发成功
        console.log("转发成功:" + JSON.stringify(res));
      },
      fail: function (res) {
        // 转发失败
        console.log("转发失败:" + JSON.stringify(res));
      }
    }
  },

  // 转发到朋友圈
  onShareTimeline: function (res) {
    if (ops.from === 'button') {
        // 来自页面内转发按钮
        console.log(ops.target)
      }
      return {
        path: 'pages/index/index',  // 路径，传递参数到指定页面。
        success: function (res) {
          // 转发成功
          console.log("转发成功:" + JSON.stringify(res));
        },
        fail: function (res) {
          // 转发失败
          console.log("转发失败:" + JSON.stringify(res));
        }
      }
  },

  // 搜索栏输入名字后页面跳转
  bindconfirmT: function (e) {
    console.log("e.detail.value");
    if(e.detail.value) {
    wx.navigateTo({
      url: '/pages/cats/' + e.detail.value + '/' + e.detail.value,
    })
  }
   },
   copyTBL: function (e) {
     var self = this;
     wx.setClipboardData({
       data: '北大猫协',//需要复制的内容
       success: function (res) {
         // self.setData({copyTip:true}),

       }
     })
   },

})

